package com.hbgc.pojo;

import java.io.Serializable;

/**
 * 定时任务策略
 * @TableName tb_task
 */
public class TbTask implements Serializable {
    /**
     * 定时任务的主键
     */
    private Integer taskid;

    /**
     * 定时任务名称
     */
    private String taskname;

    /**
     * 选择的爬虫
     */
    private Integer spiderid;

    /**
     * 定时任务的策略
     */
    private String taskmgr;

    /**
     * 任务的状态
     */
    private Byte taskstatus;

    private static final long serialVersionUID = 1L;

    /**
     * 定时任务的主键
     */
    public Integer getTaskid() {
        return taskid;
    }

    /**
     * 定时任务的主键
     */
    public void setTaskid(Integer taskid) {
        this.taskid = taskid;
    }

    /**
     * 定时任务名称
     */
    public String getTaskname() {
        return taskname;
    }

    /**
     * 定时任务名称
     */
    public void setTaskname(String taskname) {
        this.taskname = taskname;
    }

    /**
     * 选择的爬虫
     */
    public Integer getSpiderid() {
        return spiderid;
    }

    /**
     * 选择的爬虫
     */
    public void setSpiderid(Integer spiderid) {
        this.spiderid = spiderid;
    }

    /**
     * 定时任务的策略
     */
    public String getTaskmgr() {
        return taskmgr;
    }

    /**
     * 定时任务的策略
     */
    public void setTaskmgr(String taskmgr) {
        this.taskmgr = taskmgr;
    }

    /**
     * 任务的状态
     */
    public Byte getTaskstatus() {
        return taskstatus;
    }

    /**
     * 任务的状态
     */
    public void setTaskstatus(Byte taskstatus) {
        this.taskstatus = taskstatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbTask other = (TbTask) that;
        return (this.getTaskid() == null ? other.getTaskid() == null : this.getTaskid().equals(other.getTaskid()))
            && (this.getTaskname() == null ? other.getTaskname() == null : this.getTaskname().equals(other.getTaskname()))
            && (this.getSpiderid() == null ? other.getSpiderid() == null : this.getSpiderid().equals(other.getSpiderid()))
            && (this.getTaskmgr() == null ? other.getTaskmgr() == null : this.getTaskmgr().equals(other.getTaskmgr()))
            && (this.getTaskstatus() == null ? other.getTaskstatus() == null : this.getTaskstatus().equals(other.getTaskstatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTaskid() == null) ? 0 : getTaskid().hashCode());
        result = prime * result + ((getTaskname() == null) ? 0 : getTaskname().hashCode());
        result = prime * result + ((getSpiderid() == null) ? 0 : getSpiderid().hashCode());
        result = prime * result + ((getTaskmgr() == null) ? 0 : getTaskmgr().hashCode());
        result = prime * result + ((getTaskstatus() == null) ? 0 : getTaskstatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", taskid=").append(taskid);
        sb.append(", taskname=").append(taskname);
        sb.append(", spiderid=").append(spiderid);
        sb.append(", taskmgr=").append(taskmgr);
        sb.append(", taskstatus=").append(taskstatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}